<div id="main">
    <h1 class="page-title">Class: Events</h1>
  
    <section>
      <header>
        <h2>
          <span class="attribs"><span class="type-signature"></span></span
          >Events<span class="signature">()</span
          ><span class="type-signature"></span>
        </h2>
      </header>
  
      <article>
        <div class="container-overview">
          <h4 class="name" id="Events">
            <span class="type-signature"></span>new Events<span class="signature"
              >()</span
            ><span class="type-signature"></span>
          </h4>
  
          <div class="description">
            动态事件绑定方法 为构造函数添加动态事件绑定和执行方法
          </div>
  
          <dl class="details">
            <dt class="tag-source">Source:</dt>
            <dd class="tag-source">
              <ul class="dummy">
                <li>
                  <a href="#">Events.js</a>,
                  <a href="#">line 2</a>
                </li>
              </ul>
            </dd>
          </dl>
  
          <h5>Example</h5>
  
          <pre
            class="prettyprint"
          ><code><span class="com">// 使用</span><span class="pln">
  </span><span class="kwd">class</span><span class="pln"> </span><span class="typ">_Event</span><span class="pln"> </span><span class="kwd">extends</span><span class="pln"> </span><span class="typ">Events</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">}</span></code></pre>
        </div>
  
        <h3 class="subsection-title">Members</h3>
  
        <h4 class="name" id=".this._$event">
          <span class="type-signature">(static) </span>this._$event<span
            class="type-signature"
          ></span>
        </h4>
  
        <div class="description">绑定方法缓存对象</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">Events.js</a>,
                <a href="#">line 17</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h3 class="subsection-title">Methods</h3>
  
        <h4 class="name" id=".off">
          <span class="type-signature">(static) </span>off<span class="signature"
            >(str, event<span class="signature-attributes">opt</span>)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">取消事件绑定方法</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th>Attributes</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>str</code></td>
  
              <td class="type">
                <span class="param-type">String</span>
              </td>
  
              <td class="attributes"></td>
  
              <td class="description last">绑定名称</td>
            </tr>
  
            <tr>
              <td class="name"><code>event</code></td>
  
              <td class="type">
                <span class="param-type">function</span>
              </td>
  
              <td class="attributes">&lt;optional&gt;<br /></td>
  
              <td class="description last">需要取消绑定的方法</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">Events.js</a>,
                <a href="#">line 47</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Example</h5>
  
        <pre
          class="prettyprint"
        ><code><span class="kwd">var</span><span class="pln"> fun </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">arg1</span><span class="pun">,</span><span class="pln">arg2</span><span class="pun">){</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">};</span><span class="pln">
  </span><span class="com">// 单独取消</span><span class="pln">
  </span><span class="typ">_Event</span><span class="pun">.</span><span class="pln">off</span><span class="pun">(</span><span class="str">'string'</span><span class="pun">,</span><span class="pln">fun</span><span class="pun">);</span><span class="pln">
  </span><span class="com">// 全部取消</span><span class="pln">
  </span><span class="typ">_Event</span><span class="pun">.</span><span class="pln">off</span><span class="pun">(</span><span class="str">'string'</span><span class="pun">);</span></code></pre>
  
        <h4 class="name" id=".on">
          <span class="type-signature">(static) </span>on<span class="signature"
            >(str, event)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">对象绑定方法</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>str</code></td>
  
              <td class="type">
                <span class="param-type">String</span>
              </td>
  
              <td class="description last">绑定名称</td>
            </tr>
  
            <tr>
              <td class="name"><code>event</code></td>
  
              <td class="type">
                <span class="param-type">function</span>
              </td>
  
              <td class="description last">需要绑定方法</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">Events.js</a>,
                <a href="#">line 28</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Example</h5>
  
        <pre
          class="prettyprint"
        ><code><span class="typ">_Event</span><span class="pun">.</span><span class="pln">on</span><span class="pun">(</span><span class="str">'string'</span><span class="pun">,</span><span class="kwd">function</span><span class="pun">(</span><span class="pln">str</span><span class="pun">,</span><span class="pln">arg1</span><span class="pun">,</span><span class="pln">arg2</span><span class="pun">){</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">});</span></code></pre>
  
        <h4 class="name" id=".run">
          <span class="type-signature">(static) </span>run<span class="signature"
            >(str, that, object<span class="signature-attributes">opt</span
            >)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">绑定事件运行方法</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th>Attributes</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>str</code></td>
  
              <td class="type">
                <span class="param-type">String</span>
              </td>
  
              <td class="attributes"></td>
  
              <td class="description last">绑定的事件名称</td>
            </tr>
  
            <tr>
              <td class="name"><code>that</code></td>
  
              <td class="type">
                <span class="param-type">Object</span>
              </td>
  
              <td class="attributes"></td>
  
              <td class="description last">绑定事件的作用域</td>
            </tr>
  
            <tr>
              <td class="name"><code>object</code></td>
  
              <td class="type">
                <span class="param-type">*</span>
              </td>
  
              <td class="attributes">&lt;optional&gt;<br /></td>
  
              <td class="description last">任意需要传值的参数</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">Events.js</a>,
                <a href="#">line 73</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Example</h5>
  
        <pre
          class="prettyprint"
        ><code><span class="typ">_Event</span><span class="pun">.</span><span class="pln">run</span><span class="pun">(</span><span class="pln">str</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">this</span><span class="pun">,</span><span class="pln"> </span><span class="str">'string'</span><span class="pun">,</span><span class="pln"> </span><span class="pun">{},</span><span class="pln"> </span><span class="pun">[],</span><span class="pln"> </span><span class="kwd">null</span><span class="pln"> </span><span class="pun">...);</span></code></pre>
      </article>
    </section>
  </div>
  